From: Richard M. Stallman Date: Fri, 28 May 1993 05:18:06 +0000 (+0000) Subject: (find-change-log): Chase symlinks multiple levels. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~95859 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=4e44c03b9e1a227c402bc0061109c8acdcf79dd0;p=emacs.git (find-change-log): Chase symlinks multiple levels. --- diff --git a/lisp/add-log.el b/lisp/add-log.el index 276fe0aa0aa..2c9170903d1 100644 --- a/lisp/add-log.el +++ b/lisp/add-log.el @@ -65,8 +65,10 @@ current buffer to the complete file name." ;; Chase links before visiting the file. ;; This makes it easier to use a single change log file ;; for several related directories. - (setq file-name - (expand-file-name (or (file-symlink-p file-name) file-name))) + (let (temp) + (while (setq temp (file-symlink-p file-name)) + (setq file-name temp))) + (setq file-name (expand-file-name file-name)) ;; Move up in the dir hierarchy till we find a change log file. (let ((file1 file-name) parent-dir)